Demote alt to an int before use for endian safety.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 15 Mar 2005 20:14:09 +0000 (20:14 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 15 Mar 2005 20:14:09 +0000 (20:14 +0000)
gpsbabel/lowranceusr.c

index 2005670f68e4ce664c5616a5f316ff2057609c02..cd996007ed5a36e83843a1b42675e5b57c8cc125 100644 (file)
@@ -285,6 +285,7 @@ lowranceusr_waypt_pr(const waypoint *wpt)
        short int WayptType;
        char *name;
        char *comment;
+       int alt = wpt->altitude;
 
        /* our personal waypoint counter */
        my_fwrite2(&waypt_out_count, file_out);
@@ -294,7 +295,7 @@ lowranceusr_waypt_pr(const waypoint *wpt)
        my_fwrite4(&Lat, file_out);
        Lon = lon_deg_to_mm(wpt->longitude);
        my_fwrite4(&Lon, file_out);
-       my_fwrite4(&wpt->altitude, file_out);
+       my_fwrite4(&alt, file_out);
 
        /* Try and make sure we have a name */
        if ((! wpt->shortname) || global_opts.synthesize_shortnames) {